package com.zjf.addresschk;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
import java.io.InputStream;
import java.io.IOException;


public final class AppProperties {
    public static String inPath ="address.xls";
    public static String outPath ="address_result.xls";

    public static String apiKey_google="AIzaSyDUkVi6pIDqE7rmrkSchyfR-avOkaPPsOk";

    public static String apiKey_baidu_ak = "XtBOCfgETHRj62T7TM6EDZFA";//百度地图ak
    public static String apiKey_baidu_sk="TUoG9a5mIU7Ktxp8nTQWWOOqCbALd1is";//百度地图sk
    public static String apiKey_baidu_interfaceUrl="http://api.map.baidu.com/geocoder/v2/?address={address}&output=json&ak="+apiKey_baidu_ak ;//接口地址

    static {
        Properties prop = new Properties();
        try {
            InputStream in = new FileInputStream(new File("app.properties"));
            prop.load(in);
            inPath =  prop.getProperty("inPath").trim();
            outPath = prop.getProperty("outPath").trim();

            apiKey_google = prop.getProperty("apiKey_google").trim();

            apiKey_baidu_ak= prop.getProperty("apiKey_baidu_ak").trim();
            apiKey_baidu_sk= prop.getProperty("apiKey_baidu_sk").trim();
            apiKey_baidu_interfaceUrl="http://api.map.baidu.com/geocoder/v2/?address={address}&output=json&ak="+apiKey_baidu_ak ;//接口地址
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


    public static void main(String args[]) {
        System.out.println(apiKey_google);
        System.out.println(inPath);
    }
}   
  